
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%--<%@ include file="/RuKuTongJi/RuKuTJ.jsp"%>--%>
<html>
<head>
    <title>Title</title>

    <meta name="decorator" content="default"/>

    <script type="text/javascript">
        $(document).ready(function() {
            //tab页面切换 页面刷新效果
            $('ul.nav-tabs>li>a').on('click',function() {
                var $this = $(this);
                var divId = $this.attr("href");
                var srcVal = $(divId).children("iframe").attr("src");
                $(divId).children("iframe").attr("src",srcVal);
            });
        });

        // $("#actve1").click(function () {
        //     $("#tab-1").show();
        //     $("#tab-2").hide();
        // })
        // $("#actve2").click(function () {
        //     alert("ll")
        //     $("#tab-2").style("visibility:default")
        //     $("#tab-1").hide();
        // })

        function danju() {
            $("#allSubjectIframe").style.display='none'?'block':'none';

        }

        function mingxi() {
            $("#tab-2").toggle();

        }


    </script>
</head>
<body>
<div class="panel panel-default">
    <div class="panel-heading">
        <h3 class="panel-title">入库统计</h3>
    </div>
    <!-- <div class="wrapper wrapper-content"> -->
    <div class="ibox">
        <div class="ibox-content">

            <div class="tabs-container">
                <ul class="nav nav-tabs">
                    <li class="active" style="list-style: none"><button id="actve1" onclick="danju()">单据表</button></li>
                    <li class="" style="list-style: none"><button  id="actve2" onclick="mingxi()">明细表</button></li>
                </ul>

                <div class="tab-content">

                    <!-- 财务科目设置 -->
                    <div id="tab-1" class="tab-pane active">
                        <iframe id="allSubjectIframe" name="allSubjectIframe" frameborder="0" scrolling="no" width="100%" src="${ctx}/RuKuTongJi/RuKuTJ.jsp"></iframe>
                    </div>
                    <script type="text/javascript">
                        //计算iframe框架页面 height width
                        function allSubjectIframe(){
                            var iframe = document.getElementById("allSubjectIframe");
                            try{
                                var bHeight = iframe.contentWindow.document.body.scrollHeight;
                                var dHeight = iframe.contentWindow.document.documentElement.scrollHeight;
                                var height = Math.max(bHeight, dHeight);
                                iframe.height = height;
                            }catch (ex){}
                        }
                        window.setInterval("allSubjectIframe()", 200);
                    </script>

                    <!-- 本企业财务科目-->
                    <div id="tab-2" class="tab-pane" style="display:none">
                        <iframe id="subjectIframe" name="subjectIframe" frameborder="0" scrolling="no" width="100%" src="${ctx}/RuKuTongJi/RuKuMX.jsp"></iframe>
                    </div>
                    <script type="text/javascript">
                        function subjectIframe(){
                            var iframe = document.getElementById("subjectIframe");
                            try{
                                var bHeight = iframe.contentWindow.document.body.scrollHeight;
                                var dHeight = iframe.contentWindow.document.documentElement.scrollHeight;
                                var height = Math.max(bHeight, dHeight);
                                iframe.height = height;
                            }catch (ex){}
                        }
                        window.setInterval("subjectIframe()", 200);
                    </script>
</body>
</html>
